﻿<phone:PhoneApplicationPage 
    x:Class="PerFrameCallback.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot contains the root canvas where all other page content is placed-->
    <Canvas x:Name="LayoutRoot" Background="Transparent">
        <Canvas.Triggers>
            <EventTrigger RoutedEvent="Canvas.Loaded">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard RepeatBehavior="Forever" AutoReverse="True">

                            <DoubleAnimation Storyboard.TargetName="animatingRect" Storyboard.TargetProperty="(Canvas.Left)" From="0" To="440" BeginTime="0:0:0" Duration="0:0:5" RepeatBehavior="Forever" AutoReverse="True"/>

                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </Canvas.Triggers>
        <Button x:Name="showBtn" Content="Show" Canvas.Top="0" Canvas.Left="0" Width="100" Height="70" Click="showBtn_Click" Canvas.ZIndex="1" Visibility="Collapsed"/>
        <Button x:Name="deleteBtn" Content="Dlt" Canvas.Top="0" Canvas.Left="0" Width="100" Height="70" Click="deleteBtn_Click" Canvas.ZIndex="1"/>
        <Button x:Name="hideBtn" Content="Hide" Canvas.Top="730" Canvas.Left="0" Width="100" Height="70" Click="hideBtn_Click" Canvas.ZIndex="1" />
        <Button x:Name="redrawBtn" Content="Redraw" Canvas.Top="0" Canvas.Left="150" Width="180" Height="70" Click="redrawBtn_Click" Canvas.ZIndex="1" />
        <Button x:Name="cacheBtn" Content="Cache" Canvas.Top="0" Canvas.Left="320" Width="160" Height="70" Click="cacheBtn_Click" Canvas.ZIndex="1" />
        <TextBlock x:Name="counter" Text="0" Canvas.Top="80" Canvas.Left="380" Canvas.ZIndex="1"/>
        <TextBlock x:Name="cacheDisplay" Text="Cache On" Canvas.Top="110" Canvas.Left="380" Canvas.ZIndex="1"/>
        <Button x:Name="addBtn" Content="Add" Canvas.Top="730" Canvas.Left="380" Width="100" Height="70" Click="addBtn_Click" Canvas.ZIndex="1"/>
        <Rectangle x:Name="animatingRect" Canvas.Top="380" Canvas.Left="0" Width="40" Height="40" Fill="Aquamarine" Canvas.ZIndex="1"/>
    </Canvas>


</phone:PhoneApplicationPage>
